package com.example.win.android_banduyujia.venuesactivity.activity.payactivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.win.android_banduyujia.R;
import com.example.win.android_banduyujia.peopleactivity.activity.activity.payactivtiy.AccoutActivity;
import com.example.win.android_banduyujia.peopleactivity.activity.activity.payactivtiy.MonthActivity;
import com.example.win.android_banduyujia.peopleactivity.activity.activity.payactivtiy.MonthTopActivity;
import com.example.win.android_banduyujia.peopleactivity.activity.activity.payactivtiy.WeekActivity;
import com.example.win.android_banduyujia.peopleactivity.activity.activity.payactivtiy.WithdrawActivity;

/**
 * Created by Win on 2015/8/13.
 */
public class VenuesMyincomeActivity extends Activity implements View.OnClickListener {
   public static final String  TAG=VenuesMyincomeActivity.class.getSimpleName();

   private ImageView mImageClose;  // 关闭
   private TextView  mTvtToday,mTxtviewToday; // 今日
   private ImageView mIgeIcon; // 图标
   private TextView mTxtMonth; // 本月收入
   private RelativeLayout LayoutWeek, LayoutMonth, LayoutMonthTop;
   private TextView  mTvtNumber,mTxtviewNumber, mTvtMonth,mTxtviewMonth, mTvtMonthtop,mTxtviewMonthtop; // 本周排名， 本月排名, 本月榜首
   private TextView  mTvtBalance,mTxtviewBalance, mTvtWithdraw,mTxtviewWithdraw; // 账户余额，可提现余额
   private Button    mBtnBalance; // 提现
   private RelativeLayout  LayoutBalance, LayoutWithdraw;

   private String    mAccessToken;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout_income_page);

       InitViews();
    }

    private void InitViews() {
        mImageClose = (ImageView) findViewById(R.id.layout_page_image_view_close);
        mTvtToday = (TextView) findViewById(R.id.layout_page_text_view_today);
        mTxtviewToday = (TextView) findViewById(R.id.layout_page_text_view_today_number);

        mTvtNumber = (TextView) findViewById(R.id.layout_page_text_view_today);

        mIgeIcon = (ImageView) findViewById(R.id.title_money_header_view);

     //   mTvtNumber = (TextView) findViewById(R.id.title_view_money_week);
        mTxtviewNumber = (TextView) findViewById(R.id.title_text_view_money_week);
      //  mTvtMonth = (TextView) findViewById(R.id.title_view_money_month);
        mTxtviewMonth = (TextView) findViewById(R.id.title_text_view_money_month);

      //  mTvtMonthtop = (TextView) findViewById(R.id.title_view_money_month_top);
        mTxtviewMonthtop = (TextView) findViewById(R.id.title_text_view_money_month_top);

        LayoutWeek = (RelativeLayout) findViewById(R.id.layout_view_money_week);
        LayoutMonth = (RelativeLayout) findViewById(R.id.layout_view_money_month);
        LayoutMonthTop = (RelativeLayout) findViewById(R.id.layout_view_money_month_top);

        /*mTvtBalance = (TextView) findViewById(R.id.title_text_view_account_balance);
        mTxtviewBalance = (TextView) findViewById(R.id.title_list_text_view_account_balance);
        mTvtWithdraw = (TextView) findViewById(R.id.title_text_view_withdraw_money);
        mTxtviewWithdraw = (TextView) findViewById(R.id.title_list_withdraw_deposit);*/
        mBtnBalance = (Button) findViewById(R.id.button_withdraw_deposit);

        LayoutBalance = (RelativeLayout) findViewById(R.id.layout_linear_item_view_account_balance);
        LayoutWithdraw = (RelativeLayout) findViewById(R.id.layout_linear_item_withdraw);

        mImageClose.setOnClickListener(this);
        LayoutWeek.setOnClickListener(this);
        LayoutMonth.setOnClickListener(this);
        LayoutMonthTop.setOnClickListener(this);
        LayoutBalance.setOnClickListener(this);
        LayoutWithdraw.setOnClickListener(this);
        mBtnBalance.setOnClickListener(this);

        /*SeekCircle seekCircle = (SeekCircle) findViewById(R.id.title_money_header_view);
        seekCircle.setOnSeekCircleChangeListener(new SeekCircle.OnSeekCircleChangeListener() {
            @Override
            public void onProgressChanged(SeekCircle seekCircle, int progress, boolean fromUser) {
                updateText();
            }

            @Override
            public void onStartTrackingTouch(SeekCircle seekCircle) {

            }

            @Override
            public void onStopTrackingTouch(SeekCircle seekCircle) {

            }
        });
        updateText();*/
    }

    private void updateText() {
        /*SeekCircle seekCircle = (SeekCircle) findViewById(R.id.title_money_header_view);
        TextView textProgress = (TextView)findViewById(R.id.textProgress);
        if(textProgress !=null && seekCircle != null){
            int progress = seekCircle.getProgress();
            textProgress.setText(Integer.toString(progress) + "%");
        }*/
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.layout_page_image_view_close:
                 VenuesMyincomeActivity.this.finish();
                break;
            case R.id.layout_view_money_week:  // 本周排名
                // WeekActivity();
                 break;
            case R.id.layout_view_money_month: // 本月排名
                // MonthActivity();
                break;
            case R.id.layout_view_money_month_top: // 本月榜首
                // MonthTopActivity();
                break;
            case R.id.layout_linear_item_view_account_balance:
                 accoutActivity();
                break;
            case R.id.button_withdraw_deposit:
                 remindActivity();
                break;
        }
    }

    private void WeekActivity() {
          startActivity(new Intent(this, WeekActivity.class));
    }

    private void MonthActivity() {
        startActivity(new Intent(this, MonthActivity.class));
    }

    private void MonthTopActivity() {
        startActivity(new Intent(this, MonthTopActivity.class));
    }

    private void accoutActivity() {
        startActivity(new Intent(this, AccoutActivity.class));
    }

    private void remindActivity() {
        startActivity(new Intent(this, WithdrawActivity.class));
    }
}
